Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Layout/IndentationConsistency to Rubocop config #1180

Merged
merged 5 commits into from
Oct 12, 2024

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Jul 4, 2024

No description provided.

@herwinw
Copy link
Member Author

herwinw commented Jul 4, 2024

As suggested in #1174 (comment)

core/proc/curry_spec.rb Outdated Show resolved Hide resolved
@herwinw herwinw force-pushed the rubocop_layout_indentationconsistency branch from 263d481 to 82f972c Compare July 4, 2024 17:33
@herwinw herwinw mentioned this pull request Jul 4, 2024
Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@herwinw herwinw force-pushed the rubocop_layout_indentationconsistency branch from 82f972c to f0b9dd4 Compare July 7, 2024 07:56
@herwinw herwinw force-pushed the rubocop_layout_indentationconsistency branch from f0b9dd4 to fabdaac Compare October 12, 2024 15:29
@herwinw
Copy link
Member Author

herwinw commented Oct 12, 2024

I've added a few additional commits. This includes a Gemfile with the correct Rubocop version (the Gemfile.lock is ignored in git, so I left that one out) and updated Github Actions to use the gemfile. This means it's easier to run Rubocop on your home setup without having to worry about installing the correct version of Rubocop.

@herwinw herwinw marked this pull request as ready for review October 12, 2024 16:09
@eregon
Copy link
Member

eregon commented Oct 12, 2024

Mmh, one trouble with the Gemfile is if someone looks at this project they might think they should run bundle exec mspec or so to run specs, because there is a Gemfile at the root.
But on purpose ruby/spec avoids Bundler because subprocesses are a lot slower under Bundler and to keep things simple.

What I do locally is basically the same the CI does:
https://github.com/ruby/spec/blob/8aae62fbdc0e646ae775576d847beb60063ca253/.github/workflows/ci.yml#L75C12-L76
Except for the second command I use:

$ rubocop _1.28.2_ --parallel

(we could of course use that in CI too to be more explicit)

So I think either using that or adding a small script (e.g. bin/rubocop) which just runs rubocop _1.28.2_ *args is better than the Gemfile (it could also auto install the gem maybe).

@eregon
Copy link
Member

eregon commented Oct 12, 2024

Also since RuboCop 1.0 I think using a newer version of RuboCop has almost no observable behavior difference, so that should work fine too.

@herwinw herwinw merged commit c3819bc into ruby:master Oct 12, 2024
14 checks passed
@herwinw herwinw deleted the rubocop_layout_indentationconsistency branch October 12, 2024 17:35
@eregon
Copy link
Member

eregon commented Oct 13, 2024

@herwinw Could you address #1180 (comment) ?
I think having a Gemfile at the root is not good because of those reasons so I would like to find another solution.

@herwinw
Copy link
Member Author

herwinw commented Oct 13, 2024

@herwinw Could you address #1180 (comment) ? I think having a Gemfile at the root is not good because of those reasons so I would like to find another solution.

My apologies, I completely overlooked that one. I will have a look at it tomorrow or the day after tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants